package com.imooc.bilibili.service;

import com.imooc.bilibili.dao.FollowingGroupDao;
import com.imooc.bilibili.domain.FollowingGroup;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * ProjectName imooc-bilibili
 *
 * @author xieyucan
 * <br>CreateDate 2022/10/22 16:14
 */
@Service
public class FollowingGroupService {

    @Resource
    private FollowingGroupDao followingGroupDao;

    public FollowingGroup getByType(String type)
    {
        return followingGroupDao.getByType(type);
    }

    public FollowingGroup getById(Long id)
    {
        return followingGroupDao.getById(id);
    }

    public List<FollowingGroup> getByUserId(Long userId) {
        return followingGroupDao.getByUserId(userId);
    }

    public void addUserFollowGroup(FollowingGroup followingGroup) {
        followingGroupDao.addUserFollowGroup(followingGroup);
    }

    public List<FollowingGroup> getUserFollowingGroup(Long userId) {
        return followingGroupDao.getUserFollowingGroup(userId);
    }
}
